package com.hbpu.encap.extend;

public class ExtendsExercise {
    public static void main(String[] args) {

    }
}

class Computer {
    private String cpu;
    private String memery;
    private String disk;

    public Computer(String cpu, String memery, String disk) {
        this.cpu = cpu;
        this.memery = memery;
        this.disk = disk;
    }

    public void getDetail() {
        System.out.println("详细信息：" + cpu + " " + memery + " " + disk);
    }
}

class PC extends Computer {
    private String brand;

    public PC(String cpu, String memery, String disk, String brand) {
        super(cpu, memery, disk);
        this.brand = brand;
    }
}

class NotePad extends Computer {
    private String color;

    public NotePad(String cpu, String memery, String disk, String color) {
        super(cpu, memery, disk);
        this.color = color;
    }
}
